<extend name="Public/publicHTML" />

<block name='content'>
<link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__COMMON__/bootstrap/css/font-awesome.min.css" />
<section class="content">
	<div class="container-fluid">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					<i class="fa fa-list"></i> 优惠券列表
				</h3>
			</div>
			<div class="panel-body">
				<div class="navbar navbar-default">
					<form class="navbar-form form-inline" action="" method="post">
						<!--
				            <div class="form-group">
				              	<input type="text" class="form-control" placeholder="搜索">
				            </div>
				            <button type="submit" class="btn btn-default">提交</button>
                                    -->
					</form>
				</div>
				<div id="ajax_return">
					<div class="table-responsive">
						<table class="table table-bordered table-hover">
							<thead>
								<tr>
									<td  class="text-center w1"><input
										type="checkbox"
										onclick="$('input[name*=\'selected\']').prop('checked', this.checked);"></td>
									<td class="text-center">优惠券名称</td>
									<td class="text-center">发放类型</td>
									<td class="text-center">订单号</td>
									<td class="text-center">使用会员</td>
									<td class="text-center">使用时间</td>
									<if condition="($_GET['type'] eq 4)">
									<td class="text-center">优惠券码</td>
									</if>
									<td class="text-center">操作</td>
								</tr>
							</thead>
							<tbody>
								<if condition="!empty($data['data'])">
									<foreach name="data['data']" item="list">
										<tr>
											<td class="text-center"><input type="checkbox"
												name="selected[]" value="6"></td>
											<td class="text-center">{$couponData[$couponModel::$name_d]}</td>
											<td class="text-center">{$coupon[$list[$couponList::$type_d]]}</td>
											<td class="text-center">{$list[$orderModel::$orderSn_id_d]}</td>
											<td class="text-center">{$list[$userModel::$userName_d]}</td>
											<td class="text-center"><if
													condition="$list[$couponList::$useTime_d] gt 0">
												{$list[$couponList::$useTime_d]|date='Y-m-d H:i',###} <else /> N </if></td>
											<if condition="($list[$couponList::$type_d] eq 4) and ($list[$couponList::$code_d] neq '')">
											<td class="text-center">{$list[$couponList::$code_d]}</td>
											</if>
											<td class="text-center"><a
												href="{:U('couponListDel',array('id'=>$list[$couponList::$id_d]))}"
												id="button-delete6" data-toggle="tooltip" title=""
												class="btn btn-danger 
													<if condition='$list[$couponList::$useTime_d] elt 0'>  disabled  </if>" data-original-title="删除"><i
													class="fa fa-trash-o"></i></a></td>
										</tr>
									</volist>
								</foreach>
							</tbody>
						</table>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-6 text-left"></div>
					<div class="col-sm-6 text-right">{$data.page}</div>
				</div>
			</div>
		</div>
	</div>
	<!-- /.row -->
</section>
</block>